/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.crm.slcm.session;

import java.util.Date;
import java.util.List;
import javax.ejb.Remote;
import merlion.common.util.exception.NotExistException;
import merlion.crm.slcm.entity.Customer;
import merlion.crm.slcm.entity.MemberDiscountGroup;
import merlion.crm.slcm.entity.OrderDiscountGroup;
import merlion.crm.slcm.entity.SalesLead;
import merlion.crm.slcm.pojo.Analytics;
import merlion.crm.sopm.entity.ItemLine;
import merlion.frm.bpm.entity.Invoice;
import merlion.frm.ccm.entity.CreditGroup;
import merlion.mrp.ppm.entity.Product;

/**
 *
 * @author Zhang Ying
 */
@Remote
public interface SLCSessionBeanRemote {

    Customer convertSalesLead(Customer customer, SalesLead salesLead);

    Customer createCustomer(Customer customer);

    MemberDiscountGroup createMemberDiscountGroup(MemberDiscountGroup mdg);

    OrderDiscountGroup createOrderDiscountGroup(OrderDiscountGroup odg);

    SalesLead createSalesLead(SalesLead salesLead);

    String deleteMemberDiscountGroup(Long id);

    void deleteOrderDiscountGroup(Long id);

    String generateClientID();

    List<SalesLead> getAllClient();

    List<CreditGroup> getAllCreditGroup();

    List<Customer> getAllCustomer();

    List<MemberDiscountGroup> getAllMemberDiscountGroup();

    List<OrderDiscountGroup> getAllOrderDiscountGroup();

    List<Product> getAllProduct();

    List<SalesLead> getAllSalesLead();

    List<Analytics> getAnalyticsClientCategory();

    List<Analytics> getAnalyticsClientIndustry();

    List<Analytics> getAnalyticsCustomerCategory();

    List<Analytics> getAnalyticsCustomerIndustry();

    List<Analytics> getAnalyticsIndustrySales(Date start, Date end);

    List<Analytics> getAnalyticsProductSales(Date start, Date end);

    List<Analytics> getAnalyticsRegionSales(Date start, Date end);

    SalesLead getClientByClientId(String id) throws NotExistException;

    SalesLead getClientById(Long id) throws NotExistException;

    List<CreditGroup> getCreditGroupByCreditLimit();

    CreditGroup getCreditGroupbyId(Long id);

    Customer getCustomerByClientId(String clientId) throws NotExistException;

    Customer getCustomerById(Long id) throws NotExistException;

    MemberDiscountGroup getCustomerMemberDiscountGroup(Customer customer);

    MemberDiscountGroup getMemberDiscountGroupById(Long id);

    List<MemberDiscountGroup> getMemberDiscountGroupByLimitAccSpendingForDs();

    OrderDiscountGroup getOrderDiscountGroup(ItemLine il);

    OrderDiscountGroup getOrderDiscountGroupById(Long id);

    Product getProductById(Long id);

    Product getProductByProductType(String type);

    SalesLead getSalesLeadByClientId(String clientId) throws NotExistException;

    SalesLead getSalesLeadById(Long id) throws NotExistException;

    void removeSalesLead(SalesLead salesLead);

    Customer updateCustomer(Customer customer);

    void updateCustomerMemberDiscountGroup(Invoice invoice);

    MemberDiscountGroup updateMemberDiscountGroup(MemberDiscountGroup mdg);

    OrderDiscountGroup updateOrderDiscountGroup(OrderDiscountGroup odg);

    Product updateProductPrice(Product product);

    SalesLead updateSalesLead(SalesLead salesLead);
    
}
